//
//  ZHBaseAVPlayerMacro.h
//  AVPlayer
//
//  Created by 正合适 on 2017/10/20.
//  Copyright © 2017年 正合适. All rights reserved.
//  枚举 宏定义

#ifndef ZHBaseAVPlayerMacro_h
#define ZHBaseAVPlayerMacro_h

#define ZHRGBAColor(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:a]
#define ZHRGBColor(r,g,b)    ZHRGBAColor((r),(g),(b),1)
#define ZHScreenWidth        [UIScreen mainScreen].bounds.size.width
#define ZHScreenHeight       [UIScreen mainScreen].bounds.size.height

/**
 视频资源加载状态

 - playerItemLoad_Begin: 开始加载
 - playerItemLoad_Success: 加载成功
 - playerItemLoad_Fail: 加载失败
 - playerItemLoad_UnknowItem: 资源类型未知
 */
typedef NS_ENUM(NSUInteger, PlayerItemLoadStatus) {
    playerItemLoad_Begin        = 1,
    playerItemLoad_Success      = 2,
    playerItemLoad_Fail         = 3,
    playerItemLoad_UnknowItem   = 4,
};


/**
 视频播放状态

 - play_Play: 播放
 - play_Pause: 暂停
 - play_End: 播放结束
 */
typedef NS_ENUM(NSUInteger, PlayerPlayStatus) {
    play_Play   = 1,
    play_Pause  = 2,
    play_End    = 3,
};


/**
 播放器适配方式

 - gravityResizeAspect: 保持比例不变填充，有边
 - gravityResizeAspectFill: 保持比例不变，填充满
 - gravityResize: 填充，但不保持比例
 */
typedef NS_ENUM(NSUInteger, PlayerGrivaty) {
    gravityResizeAspect     = 1,
    gravityResizeAspectFill = 2,
    gravityResize           = 3,
};


/**
 视频播放的缓存状态

 - bufferType_available: 缓存足够播放视频
 - bufferType_unavailable: 缓存不足以播放视频
 */
typedef NS_ENUM(NSUInteger, VideoBufferType) {
    bufferType_available    = 1,
    bufferType_unavailable  = 2,
};

#endif /* ZHBaseAVPlayerMacro_h */
